package com.xh.bussiness.course.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xh.bussiness.course.dao.PrepareLessonScoreMapper;
import com.xh.bussiness.course.model.PrepareLessonScore;
import com.xh.bussiness.course.service.IPrepareLessonScoreService;
import com.xh.core.service.impl.BaseServiceImpl;
import com.xh.core.util.UserUtils;
import org.springframework.stereotype.Service;

import java.util.Map;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Pitt
 * @since 2020-12-15
 */
@Service
public class PrepareLessonScoreServiceImpl extends BaseServiceImpl<PrepareLessonScoreMapper, PrepareLessonScore> implements IPrepareLessonScoreService {

    @Override
    public PrepareLessonScore queryByPrepareLessonId(String prepareLessonId) {
        QueryWrapper<PrepareLessonScore> qw = new QueryWrapper<>();
        qw.eq("prepare_lesson_id", prepareLessonId);
        return this.dao.selectOne(qw);
    }

    @Override
    public void deleteByPrepareLessonId(String prepareLessonId) {
        this.dao.deleteByPrepareLessonId(prepareLessonId);
    }
}
